import { CreateOpsWebApp } from '@/utils/fetch';

const request = CreateOpsWebApp();

export const newBranchApi = async (params) => {
  return request.post('/gitlab/newBranch', params);
};

export const getBranchesApi = async (params) => {
  return request.post('/gitlab/getBranches', params);
};

export const searchApi = async (params) => {
  return request.post('/gitlab/search', params);
};

export const getBranchCommitApi = async (params) => {
  return request.post('/gitlab/getBranchCommit', params);
};

export const editApi = async (params) => {
  return request.post('/gitlab/edit', params);
};

export const deleteApi = async (params) => {
  return request.post('/gitlab/delete', params);
};

export const addStoryApi = async (params) => {
  return request.post('/tapd/story/addStory', params);
};

export const sync = async () => {
  return request.get('/gitlab/sync');
};

export const getProjectList = async (params) => {
  return request.get('/gitlab/projectList', params);
};

export default {};
